import { post, get } from '../../../request'

/**
 * 全查
 * @param {*} params
 * @returns
 */
export const menuListAll = params => {
    return post({
        url: '/system/menu/listAll',
        params
    })
}

/**
 * 菜单保存
 * @param {*} params
 * @returns
 */
export const menuSave = params => {
    return post({
        url: '/system/menu/save',
        params
    })
}

/**
 * 菜单修改
 * @param {*} params
 * @returns
 */
export const menuUpdate = params => {
    return post({
        url: '/system/menu/update',
        params
    })
}

/**
 * 菜单删除
 * @param {*} params
 * @returns
 */
export const menuDelete = params => {
    return post({
        url: '/system/menu/delete',
        params
    })
}

/**
 * 菜单树结构查询
 * @param {*} params
 * @returns
 */
export const menuTreeselect = params => {
    return get({
        url: '/system/menu/getMenuTreeSelect',
        params
    })
}

export function roleMenuData(query) {
    return get({
        url: '/system/menu/getRoleMenuData',
        params: query
    })
}
